<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        body,
        input,
        p {
            margin: 0;
            padding: 0;
        }

        body {
            font: 12px/1.5 Tahoma;
        }

        #box {
            width: 200px;
            margin: 10px auto;
        }

        input {
            margin-right: 5px;
            /* vertical-align 属性设置元素的垂直对齐方式 */
            vertical-align: middle;
        }

        #tips {
            padding: 5px;
            margin-top: 5px;
            background: tan;
            border: 1px solid #f90;
            display: none;
        }
    </style>
    <script>
        window.onload = function(){
            var tips = document.getElementById("tips");
            var labels = document.getElementsByTagName("label")[0];
            labels.onmouseover = function(){
                tips.style.display = 'block';
            };
            labels.onmouseout = function(){
                tips.style.display = 'none';
            }
        }
    </script>
</head>

<body>
    <div id="box">
        <label><input type="checkbox" />两周内自动登陆</label>
        <div id="tips">为了您的信息安全，请不要在网吧或公用电脑上使用此功能！</div>
    </div>

</body>

</html>